package com.zhihuiyanche.service.shops.impl;

import com.zhihuiyanche.dao.ShopsMapper;
import com.zhihuiyanche.domain.Shops;
import com.zhihuiyanche.service.shops.ShopsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("shopsService")
public class ShopsServiceImpl implements ShopsService {

	@Autowired
    ShopsMapper shopsMapper;
	
	@Override
	public String insertShops(Shops shops) {
		shops.setIsValid(1);
		shops.setIsWorking(0);
        shopsMapper.insertSelective(shops);
		return "";
	}

	@Override
	public boolean deleteShopsById(Shops shops) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteShopsByCondition(Shops shops) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean updateShopsById(Shops shops) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean updateShopsByCondition(Shops record, Shops parameter) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Shops getShopsById(Shops shops) {
		Shops resultShop = shopsMapper.queryShopsById(shops);
		return resultShop;
	}

	@Override
	public List<Shops> getShopsAll(Shops shops) {
		return shopsMapper.queryShopsByCondition(shops);
	}

	@Override
	public int getShopsByPageCount(Shops shops) {
		// TODO Auto-generated method stub
		return 0;
	}
	
}
